.loading-2 {
  transform: scale(0.7, 0.7);
  width: 64rpx;
  height: 64rpx;
  position: relative;

  &::before,
  &::after {
    content: '';
    display: block;
    width: 28rpx;
    height: 28rpx;
    margin-top: -14rpx;
    margin-left: -14rpx;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--color);
    animation: cube-transition 1.6s 0s infinite ease-in-out;
  }
  &::after {
    animation-delay: -0.8s;
  }
}

@keyframes cube-transition {
  25% {
    top: 0;
    left: 100%;
    transform: scale(0.5) rotate(-90deg);
  }
  50% {
    top: 100%;
    left: 100%;
    transform: scale(1) rotate(-180deg);
  }
  75% {
    top: 100%;
    left: 0;
    transform: scale(0.5) rotate(-270deg);
  }
  100% {
    top: 0;
    left: 0;
    transform: scale(1) rotate(-360deg);
  }
}
